package Text8;

import java.util.*;

public class Main {
    static final int N = 4;
    static char[][] g = new char[N][N];
    static char[][] backup = new char[N][N];

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        for (int i = 0; i < 4; i++) {
            g[i] = scanner.next().toCharArray();
        }
        ArrayList<PII> res = new ArrayList();
        for (int op = 0; op < 1 << 16; op++) {
            ArrayList<PII> tmp = new ArrayList();
            for (int i = 0; i < 4; i++)
                backup[i] = g[i].clone();
            // 进行操作
            for (int i = 0; i < 4; i++) {
                for (int j = 0; j < 4; j++) {
                    if ((op >> get_index(i, j) & 1) == 1) {
                        turn_all(i, j);
                        tmp.add(new PII(i, j));
                    }
                }
            }
            // 判断所有灯泡是否全亮
            boolean flag = true;
            for (int i = 0; i < 4; i++) {
                for (int j = 0; j < 4; j++) {
                    if (g[i][j] == '+') {
                        flag = false;
                        break;
                    }
                }
            }
            if (flag) {
                if (res.isEmpty() || res.size() > tmp.size()) {
                    res = tmp;
                }
            }
            for (int i = 0; i < 4; i++)
                g[i] = backup[i].clone();
        }
        System.out.println(res.size());
        for (PII p : res) {
            System.out.println((p.getX() + 1) + " " + (p.getY() + 1));
        }
    }

    private static void turn_all(int i, int j) {
        for (int k = 0; k < 4; k++) {
            trun_one(i, k);
            trun_one(k, j);
        }
        trun_one(i, j);
    }

    private static void trun_one(int x, int y) {
        if (g[x][y] == '+') {
            g[x][y] = '-';
        } else {
            g[x][y] = '+';
        }
    }

    private static int get_index(int i, int j) {
        return 4 * i + j;
    }
}

class PII {
    private int x, y;

    public PII(int x, int y) {
        this.x = x;
        this.y = y;
    }

    public int getX() {
        return x;
    }

    public int getY() {
        return y;
    }
}